#ifndef _MAIN_H_
#define _MAIN_H_

#include "../include/Lib_Clara.h"
#include "../include/Dir.h"
#include "../include/cfg_items.h"
#include "../include/var_arg.h"

#include "config_data.h"
#include "conf_loader.h"
#include "resource.h"

#define VIEW_MODE_HEX      0
#define VIEW_MODE_CHAR     1
#define VIEW_MODE_STRING   2


#define E_FAIL             0xFFFFFFFF
#define TO_LOWER(x)        ( x | 0x20 )

typedef struct
{
  
   BOOK  book;
   GUI  *board;
   GUI  *textin;
   wchar_t path[128];
   wchar_t fname[128];
   bool file_open;
   GUI_LIST *gui;
} MyBOOK;


// .: FILE :.
typedef struct 
{
  int handle;
  unsigned int position;
  unsigned int size;
  unsigned int mode;
  wchar_t *path;
  wchar_t *name;
}FILE;


extern void GuiCreateGuiList(void * r0, BOOK * bk);
extern BOOK   *MSBook;
extern MyBOOK *MMSBook;
extern wchar_t imageID;
//extern MyBOOK * myBook;
#define GUI_NAME L"Search menu"
//int CreateDB(void *data, BOOK * book);
int onBcfgConfig(void* mess,BOOK* b);

#endif /* _MAIN_H_ */
